package com.sisgh.jefdv1.util;

/**
 * 类型转化工具类
 */
public class TypeUtils {

    /**
     * Jdbc类型转换成Java类型
     * @param jdbc
     * @return
     */
    public static String JdbcToJava(String jdbc){
        return switch (jdbc){
            case "INTEGER" -> "Integer";
            case "BIGINT" -> "Long";
            case "DATE" -> "Date";
            case "TIME" -> "Time";
            case "TIMESTAMP" -> "Timestamp";
            case "BOOLEAN" -> "Boolean";
            case "FLOAT" -> "Float";
            case "DOUBLE", "NUMERIC" -> "Double";
            case "DECIMAL" -> "BigDecimal";
            case "BIT", "SMALLINT" -> "Byte";
            case "TINYINT" -> "Short";
            default -> "String";
        };
    }

}
